home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / EARCD / comm / term / term_47a_pch.lha / Source / gtlayout-38.3 / gtlayout.h < prev    next >
C/C++ Source or Header  |  1996-11-12  |  19KB  |  640 lines

  1. /*
  2. **    $VER: gtlayout.h 38.1 (10.11.96)
  3. **    GadTools layout toolkit
  4. **
  5. **    Copyright © 1993-1996 by Olaf `Olsen' Barthel
  6. **        Freely distributable.
  7. */
  8.  
  9. #ifndef _GTLAYOUT_H
  10. #define _GTLAYOUT_H
  11.  
  12.  
  13. /*****************************************************************************/
  14.  
  15.  
  16. #ifndef INTUITION_GADGETCLASS_H
  17. #include <intuition/gadgetclass.h>
  18. #endif    /* !INTUITION_GADGETCLASS_H */
  19.  
  20. #ifndef LIBRARIES_GADTOOLS_H
  21. #include <libraries/gadtools.h>
  22. #endif    /* !LIBRARIES_GADTOOLS_H */
  23.  
  24.  
  25. /*****************************************************************************/
  26.  
  27.  
  28. /* Kinds of objects supported in addition to the normal GadTools kinds */
  29. #define HORIZONTAL_KIND    45
  30. #define VERTICAL_KIND    46
  31. #define END_KIND    47
  32. #define FRAME_KIND    48
  33. #define BOX_KIND    49
  34. #define FRACTION_KIND    50
  35. #define XBAR_KIND    51
  36. #define YBAR_KIND    52
  37. #define PASSWORD_KIND    53
  38. #define GAUGE_KIND    54
  39. #define TAPEDECK_KIND    55
  40. #define LEVEL_KIND    56
  41. #define BOOPSI_KIND    57
  42. #define POPUP_KIND    58
  43. #define TAB_KIND    59
  44. #define BLANK_KIND    60
  45.  
  46.  
  47. /*****************************************************************************/
  48.  
  49.  
  50. /* Where to place a gadget label */
  51. enum
  52. {
  53.     PLACE_Left,
  54.     PLACE_Right,
  55.     PLACE_Above,
  56.     PLACE_In,
  57.     PLACE_Below
  58. };
  59.  
  60. /* How to align text lines in BOX_KIND gadgets */
  61. enum
  62. {
  63.     ALIGNTEXT_Left,
  64.     ALIGNTEXT_Centered,
  65.     ALIGNTEXT_Right,
  66.     ALIGNTEXT_Pad
  67. };
  68.  
  69. /* The button images available for TAPEDECK_KIND gadgets. */
  70. enum
  71. {
  72.     TDBT_Backward,
  73.     TDBT_Forward,
  74.     TDBT_Previous,
  75.     TDBT_Next,
  76.     TDBT_Stop,
  77.     TDBT_Pause,
  78.     TDBT_Record,
  79.     TDBT_Rewind,
  80.     TDBT_Eject,
  81.     TDBT_Play,
  82.  
  83.     TDBTLAST
  84. };
  85.  
  86. /* The frame types for groups. */
  87. enum
  88. {
  89.     FRAMETYPE_None,
  90.     FRAMETYPE_Label,
  91.     FRAMETYPE_Tab
  92. };
  93.  
  94. /* How to align the window opened by LT_Build() on the screen. */
  95. #define ALIGNF_Right        (1 << 0)
  96. #define ALIGNF_Left        (1 << 1)
  97. #define ALIGNF_Top        (1 << 2)
  98. #define ALIGNF_Bottom        (1 << 3)
  99. #define ALIGNF_ExtraRight    (1 << 4)
  100. #define ALIGNF_ExtraLeft    (1 << 5)
  101. #define ALIGNF_ExtraTop        (1 << 6)
  102. #define ALIGNF_ExtraBottom    (1 << 7)
  103.  
  104.  
  105. /*****************************************************************************/
  106.  
  107.  
  108. /* Generic tags, applicable for several object types */
  109. #define LA_Chars        TAG_USER+2
  110. #define LA_LabelPlace        TAG_USER+3
  111. #define LA_ExtraSpace        TAG_USER+4
  112. #define LA_NoKey        TAG_USER+30
  113. #define LA_HighLabel        TAG_USER+31
  114. #define LA_LabelText        TAG_USER+37
  115. #define LA_LabelID        TAG_USER+38
  116. #define LA_ID            TAG_USER+39
  117. #define LA_Type            TAG_USER+40
  118. #define LA_PageSelector        TAG_USER+79
  119. #define LA_LabelChars        TAG_USER+107
  120.  
  121. /* Storage type tags */
  122. #define LA_BYTE            TAG_USER+63
  123. #define LA_UBYTE        TAG_USER+64
  124. #define LA_WORD            TAG_USER+65
  125. #define LA_BOOL            TAG_USER+65
  126. #define LA_UWORD        TAG_USER+66
  127. #define LA_LONG            TAG_USER+67
  128. #define LA_ULONG        TAG_USER+68
  129. #define LA_STRPTR        TAG_USER+69
  130.  
  131. /* for use with LT_GetAttributes() only */
  132. #define LA_Left            TAG_USER+16
  133. #define LA_Top            TAG_USER+17
  134. #define LA_Width        TAG_USER+18
  135. #define LA_Height        TAG_USER+19
  136. #define LA_LabelLeft        TAG_USER+114
  137. #define LA_LabelTop        TAG_USER+115
  138.  
  139. /* BOOPSI_KIND */
  140. #define LABO_TagCurrent        TAG_USER+119
  141. #define LABO_TagTextAttr    TAG_USER+120
  142. #define LABO_TagDrawInfo    TAG_USER+121
  143. #define LABO_TagLink        TAG_USER+129
  144. #define LABO_TagScreen        TAG_USER+132
  145. #define LABO_Link        LALV_Link
  146. #define LABO_ClassInstance    TAG_USER+122
  147. #define LABO_ClassName        TAG_USER+123
  148. #define LABO_ClassLibraryName    TAG_USER+124
  149. #define LABO_ExactWidth        TAG_USER+127
  150. #define LABO_ExactHeight    TAG_USER+128
  151. #define LABO_RelFontHeight    TAG_USER+131
  152. #define LABO_Object        TAG_USER+133
  153. #define LABO_FullWidth        TAG_USER+135
  154. #define LABO_FullHeight        TAG_USER+136
  155. #define LABO_ActivateHook    TAG_USER+141
  156.  
  157. /* BOX_KIND */
  158. #define LABX_Labels        TAG_USER+12
  159. #define LABX_Lines        TAG_USER+13
  160. #define LABX_Chars        TAG_USER+2
  161. #define LABX_Rows        TAG_USER+1
  162. #define LABX_Index        TAG_USER+14
  163. #define LABX_Text        TAG_USER+15
  164. #define LABX_AlignText        TAG_USER+27
  165. #define LABX_DrawBox        TAG_USER+11
  166. #define LABX_FirstLabel        TAG_USER+44
  167. #define LABX_LastLabel        TAG_USER+45
  168. #define LABX_ReserveSpace    TAG_USER+72
  169. #define LABX_LabelTable        TAG_USER+98
  170. #define LABX_FirstLine        TAG_USER+152
  171. #define LABX_LastLine        TAG_USER+153
  172. #define LABX_LineTable        TAG_USER+156
  173. #define LABX_Line        TAG_USER+161
  174. #define LABX_LineID        TAG_USER+162
  175.  
  176. /* BUTTON_KIND */
  177. #define LABT_ReturnKey        TAG_USER+34
  178. #define LABT_DefaultButton    TAG_USER+34
  179. #define LABT_EscKey        TAG_USER+56
  180. #define LABT_ExtraFat        TAG_USER+29
  181. #define LABT_Lines        TAG_USER+140
  182. #define LABT_FirstLine        TAG_USER+44
  183. #define LABT_LastLine        TAG_USER+45
  184. #define LABT_DefaultCorrection    TAG_USER+145
  185. #define LABT_Smaller        TAG_USER+147
  186.  
  187. /* CYCLE_KIND */
  188. #define LACY_FirstLabel        TAG_USER+44
  189. #define LACY_LastLabel        TAG_USER+45
  190. #define LACY_LabelTable        TAG_USER+98
  191. #define LACY_AutoPageID        TAG_USER+103
  192. #define LACY_TabKey        TAG_USER+118
  193.  
  194. /* FRAME_KIND */
  195. #define LAFR_InnerWidth        TAG_USER+9
  196. #define LAFR_InnerHeight    TAG_USER+10
  197. #define LAFR_DrawBox        TAG_USER+11
  198. #define LAFR_RefreshHook    TAG_USER+117
  199. #define LAFR_GenerateEvents    TAG_USER+155
  200.  
  201. /* GAUGE_KIND */
  202. #define LAGA_Percent        TAG_USER+36
  203. #define LAGA_InfoLength        TAG_USER+70
  204. #define LAGA_InfoText        TAG_USER+71
  205. #define LAGA_NoTicks        TAG_USER+143
  206. #define LAGA_Discrete        TAG_USER+144
  207. #define LAGA_Tenth        TAG_USER+144
  208.  
  209. /* INTEGER_KIND */
  210. #define LAIN_LastGadget        TAG_USER+28
  211. #define LAIN_Min        TAG_USER+23
  212. #define LAIN_Max        TAG_USER+24
  213. #define LAIN_UseIncrementers    TAG_USER+57
  214. #define LAIN_Incrementers    TAG_USER+57
  215. #define LAIN_HistoryLines    TAG_USER+59
  216. #define LAIN_HistoryHook    TAG_USER+80
  217. #define LAIN_IncrementerHook    TAG_USER+85
  218. #define LAIN_Activate        TAG_USER+148
  219.  
  220. /* LISTVIEW_KIND */
  221. #define LALV_ExtraLabels    TAG_USER+26
  222. #define LALV_Labels        TAG_USER+33
  223. #define LALV_CursorKey        TAG_USER+35
  224. #define LALV_Columns        TAG_USER+2
  225. #define LALV_Lines        TAG_USER+1
  226. #define LALV_Link        TAG_USER+7
  227. #define LALV_FirstLabel        TAG_USER+44
  228. #define LALV_LastLabel        TAG_USER+45
  229. #define LALV_MaxGrowX        TAG_USER+77
  230. #define LALV_MaxGrowY        TAG_USER+78
  231. #define LALV_LabelTable        TAG_USER+98
  232. #define LALV_LockSize        TAG_USER+106
  233. #define LALV_ResizeX        TAG_USER+109
  234. #define LALV_ResizeY        TAG_USER+110
  235. #define LALV_MinChars        TAG_USER+111
  236. #define LALV_MinLines        TAG_USER+112
  237. #define LALV_FlushLabelLeft    TAG_USER+113
  238. #define LALV_TextAttr        TAG_USER+138
  239. #define LALV_AutoPageID        TAG_USER+103
  240. #define LALV_Selected        TAG_USER+167
  241.  
  242. /* LEVEL_KIND */
  243. #define LAVL_Min        GTSL_Min
  244. #define LAVL_Max        GTSL_Max
  245. #define LAVL_Level        GTSL_Level
  246. #define LAVL_LevelFormat    GTSL_LevelFormat
  247. #define LAVL_LevelPlace        GTSL_LevelPlace
  248. #define LAVL_DispFunc        GTSL_DispFunc
  249. #define LAVL_FullCheck        LASL_FullCheck
  250.  
  251. /* MX_KIND */
  252. #define LAMX_FirstLabel        TAG_USER+44
  253. #define LAMX_LastLabel        TAG_USER+45
  254. #define LAMX_LabelTable        TAG_USER+98
  255. #define LAMX_TabKey        TAG_USER+118
  256. #define LAMX_AutoPageID        TAG_USER+103
  257.  
  258. /* PALETTE_KIND */
  259. #define LAPA_SmallPalette    TAG_USER+32
  260. #define LAPA_Lines        LA_Lines
  261. #define LAPA_UsePicker        TAG_USER+137
  262. #define LAPA_Picker        TAG_USER+137
  263.  
  264. /* PASSWORD_KIND */
  265. #define LAPW_String             GTST_String
  266. #define LAPW_LastGadget        TAG_USER+28
  267. #define LAPW_HistoryLines    TAG_USER+59
  268. #define LAPW_HistoryHook    TAG_USER+80
  269. #define LAPW_Activate        TAG_USER+148
  270. #define LAPW_MaxChars        GTST_MaxChars
  271.  
  272. /* POPUP_KIND */
  273. #define LAPU_FirstLabel        TAG_USER+44
  274. #define LAPU_LastLabel        TAG_USER+45
  275. #define LAPU_LabelTable        TAG_USER+98
  276. #define LAPU_AutoPageID        TAG_USER+103
  277. #define LAPU_TabKey        TAG_USER+118
  278. #define LAPU_Labels        GTCY_Labels
  279. #define LAPU_Active        GTCY_Active
  280. #define LAPU_CentreActive    TAG_USER+163
  281.  
  282. /* SLIDER_KIND */
  283. #define LASL_FullCheck        TAG_USER+22
  284.  
  285. /* SCROLLER_KIND */
  286. #define LASC_Thin        TAG_USER+62
  287.  
  288. /* STRING_KIND */
  289. #define LAST_LastGadget        TAG_USER+28
  290. #define LAST_Link        TAG_USER+7
  291. #define LAST_Picker        TAG_USER+5
  292. #define LAST_UsePicker        TAG_USER+5
  293. #define LAST_HistoryLines    TAG_USER+59
  294. #define LAST_HistoryHook    TAG_USER+80
  295. #define LAST_CursorPosition    TAG_USER+105
  296. #define LAST_Activate        TAG_USER+148
  297. #define LAST_ValidateHook    TAG_USER+165
  298.  
  299. /* TAB_KIND */
  300. #define LATB_FirstLabel        TAG_USER+44
  301. #define LATB_LastLabel        TAG_USER+45
  302. #define LATB_LabelTable        TAG_USER+98
  303. #define LATB_AutoPageID        TAG_USER+103
  304. #define LATB_TabKey        TAG_USER+118
  305. #define LATB_Labels        GTCY_Labels
  306. #define LATB_Active        GTCY_Active
  307. #define LATB_FullWidth        TAG_USER+149
  308. #define LATB_FullSize        TAG_USER+149
  309.  
  310. /* TAPEDECK_KIND */
  311. #define LATD_ButtonType        TAG_USER+86
  312. #define LATD_Toggle        TAG_USER+87
  313. #define LATD_Pressed        TAG_USER+88
  314. #define LATD_Smaller        TAG_USER+89
  315. #define LATD_Tick        TAG_USER+139
  316.  
  317. /* TEXT_KIND */
  318. #define LATX_Picker        TAG_USER+5
  319. #define LATX_UsePicker        TAG_USER+5
  320. #define LATX_LockSize        TAG_USER+106
  321.  
  322. /* VERTICAL_KIND and HORIZONTAL_KIND */
  323. #define LAGR_Spread        TAG_USER+6
  324. #define LAGR_SameSize        TAG_USER+8
  325. #define LAGR_LastAttributes    TAG_USER+46
  326. #define LAGR_ActivePage        TAG_USER+58
  327. #define LAGR_Frame        TAG_USER+104
  328. #define LAGR_IndentX        TAG_USER+130
  329. #define LAGR_IndentY        TAG_USER+134
  330. #define LAGR_NoIndent        TAG_USER+146
  331. #define LAGR_SameWidth        TAG_USER+150
  332. #define LAGR_SameHeight        TAG_USER+151
  333. #define LAGR_FrameGroup        TAG_USER+168
  334.  
  335. /* XBAR_KIND */
  336. #define LAXB_FullSize        TAG_USER+50
  337. #define LAXB_FullWidth        TAG_USER+50
  338.  
  339. /* Applicable for layout handle only */
  340. #define LAHN_TextAttr        TAG_USER+41
  341. #define LAHN_AutoActivate    TAG_USER+42
  342. #define LAHN_LocaleHook        TAG_USER+4
  343. #define LAHN_CloningPermitted    TAG_USER+61
  344. #define LAHN_EditHook        TAG_USER+74
  345. #define LAHN_ExactClone        TAG_USER+75
  346. #define LAHN_MenuGlyphs        TAG_USER+76
  347. #define LAHN_Parent        TAG_USER+83
  348. #define LAHN_BlockParent    TAG_USER+84
  349. #define LAHN_SimpleClone    TAG_USER+90
  350. #define LAHN_ExitFlush        TAG_USER+108
  351. #define LAHN_UserData        TAG_USER+116
  352. #define LAHN_RawKeyFilter    TAG_USER+142
  353. #define LAHN_DontPickShortcuts    TAG_USER+154
  354. #define LAHN_NoKeys        TAG_USER+154
  355. #define LAHN_PubScreen        TAG_USER+157
  356. #define LAHN_PubScreenName    TAG_USER+158
  357. #define LAHN_PubScreenFallBack    TAG_USER+159
  358.  
  359. /* Applicable for menus only. */
  360. #define LAMN_FirstLabel        LABX_FirstLabel
  361. #define LAMN_LastLabel        LABX_LastLabel
  362. #define LAMN_LabelTable        TAG_USER+98
  363. #define LAMN_TitleText        TAG_USER+17000
  364. #define LAMN_TitleID        TAG_USER+17001
  365. #define LAMN_ItemText        TAG_USER+17002
  366. #define LAMN_ItemID        TAG_USER+17003
  367. #define LAMN_SubText        TAG_USER+17004
  368. #define LAMN_SubID        TAG_USER+17005
  369. #define LAMN_KeyText        TAG_USER+17006
  370. #define LAMN_KeyID        TAG_USER+17007
  371. #define LAMN_CommandText    TAG_USER+17008
  372. #define LAMN_CommandID        TAG_USER+17009
  373. #define LAMN_MutualExclude    TAG_USER+17010
  374. #define LAMN_UserData        TAG_USER+17011
  375. #define LAMN_Disabled        TAG_USER+17012
  376. #define LAMN_CheckIt        TAG_USER+17013
  377. #define LAMN_Checked        TAG_USER+17014
  378. #define LAMN_Toggle        TAG_USER+17015
  379. #define LAMN_Code        TAG_USER+17016
  380. #define LAMN_Qualifier        TAG_USER+17017
  381. #define LAMN_Char        TAG_USER+17018
  382. #define LAMN_ID            TAG_USER+17019
  383. #define LAMN_AmigaGlyph        TAG_USER+17020
  384. #define LAMN_CheckmarkGlyph    TAG_USER+17021
  385. #define LAMN_Error        TAG_USER+17022
  386. #define LAMN_Screen        TAG_USER+17023
  387. #define LAMN_TextAttr        TAG_USER+17024
  388. #define LAMN_LayoutHandle    TAG_USER+17025
  389. #define LAMN_Handle        TAG_USER+17025
  390. #define LAMN_ExtraSpace        TAG_USER+17026
  391. #define LAMN_FullMenuNum    TAG_USER+160
  392.  
  393. /* Applicable for window only */
  394. #define LAWN_Menu        TAG_USER+25
  395. #define LAWN_UserPort        TAG_USER+47
  396. #define LAWN_Left        TAG_USER+48
  397. #define LAWN_Top        TAG_USER+49
  398. #define LAWN_Zoom        TAG_USER+50
  399. #define LAWN_MaxPen        TAG_USER+52
  400. #define LAWN_BelowMouse        TAG_USER+53
  401. #define LAWN_MoveToWindow    TAG_USER+54
  402. #define LAWN_AutoRefresh    TAG_USER+55
  403. #define LAWN_HelpHook        TAG_USER+73
  404. #define LAWN_Parent        TAG_USER+81
  405. #define LAWN_BlockParent    TAG_USER+82
  406. #define LAWN_SmartZoom        TAG_USER+91
  407. #define LAWN_Title        TAG_USER+92
  408. #define LAWN_TitleText        TAG_USER+92
  409. #define LAWN_Bounds        TAG_USER+93
  410. #define LAWN_ExtraWidth        TAG_USER+94
  411. #define LAWN_ExtraHeight    TAG_USER+95
  412. #define LAWN_IDCMP        TAG_USER+96
  413. #define LAWN_AlignWindow    TAG_USER+97
  414. #define LAWN_TitleID        TAG_USER+99
  415. #define LAWN_FlushLeft        TAG_USER+14000    /* NOTEZ-BIEN: TAG_USER+99 = WA_Dummy and can clash */
  416. #define LAWN_FlushTop        TAG_USER+14001    /*             with Intuition!                      */
  417. #define LAWN_Show        TAG_USER+14002
  418. #define LAWN_MenuTemplate    TAG_USER+14003
  419. #define LAWN_MenuTags        TAG_USER+14004
  420. #define LAWN_NoInitialRefresh    TAG_USER+164
  421. #define LAWN_LimitWidth        TAG_USER+165
  422. #define LAWN_LimitHeight    TAG_USER+166
  423.  
  424. /* Private tags; do not use, or you'll run into trouble! */
  425. #define LA_Private1        TAG_USER+100
  426. #define LA_Private2        TAG_USER+101
  427.  
  428. /* Last tag item value used */
  429. #define LAST_TAG        TAG_USER+168
  430.  
  431.  
  432. /*****************************************************************************/
  433.  
  434.  
  435. /* Identifies the absence of a link for a listview or a string gadget */
  436. #define NIL_LINK (-2)
  437.  
  438.  
  439. /*****************************************************************************/
  440.  
  441.  
  442. /* String gadget type history hook support: you will either get
  443.  * the following value passed as the message parameter to your
  444.  * hook function, or a pointer to a null-terminated string you should
  445.  * copy and create a Node from, which you should then add to the tail
  446.  * of your history list. Place a pointer to your history list in the
  447.  * Hook.h_Data entry.
  448.  */
  449. #define HISTORYHOOK_DiscardOldest (0)
  450.  
  451.  
  452. /*****************************************************************************/
  453.  
  454.  
  455. /* Refresh hook support: you will get the following structure
  456.  * passed as the message and a pointer to the LayoutHandle as
  457.  * the object.
  458.  */
  459. typedef struct RefreshMsg
  460. {
  461.     LONG    ID;
  462.     WORD    Left;
  463.     WORD    Top;
  464.     WORD    Width;
  465.     WORD    Height;
  466. } RefreshMsg;
  467.  
  468.  
  469. /*****************************************************************************/
  470.  
  471.  
  472. /* Incrementer hook support: you will get the current value
  473.  * passed as the object and one of the following values as
  474.  * the message. Return the number to be used.
  475.  */
  476. enum
  477. {
  478.     INCREMENTERMSG_Decrement = -1,    /* Decrement value */
  479.     INCREMENTERMSG_Initial   =  0,    /* Initial value passed upon gadget creation */
  480.     INCREMENTERMSG_Increment =  1    /* Increment value */
  481. };
  482.  
  483.  
  484. /*****************************************************************************/
  485.  
  486.  
  487. /* Help key hook support: the hook will be called with a "struct IBox *"
  488.  * as the object and a "struct HelpMsg *". The IBox describes the object
  489.  * the mouse was positioned over, such as a button, a listview, etc.
  490.  * The "ObjectID" will indicate the ID of the object the mouse was
  491.  * positioned over. The ID will be -1 if no object was to be found.
  492.  */
  493. typedef struct HelpMsg
  494. {
  495.     struct LayoutHandle    *Handle;    /* Window layout handle */
  496.     LONG             ObjectID;    /* ID of the object, -1 for full window */
  497. } HelpMsg;
  498.  
  499.  
  500. /*****************************************************************************/
  501.  
  502.  
  503. /* The central data structure of the layout process. */
  504. typedef struct LayoutHandle
  505. {
  506.     struct Screen    *Screen;
  507.     struct DrawInfo    *DrawInfo;
  508.     struct Window    *Window;
  509.     APTR         VisualInfo;
  510.     struct Image    *AmigaGlyph;
  511.     struct Image    *CheckGlyph;
  512.     APTR         UserData;    /* Requires gtlayout.library V9 */
  513.     struct Menu    *Menu;        /* Requires gtlayout.library V13 */
  514.  
  515.     /* Hands off, private fields follow.... */
  516. } LayoutHandle;
  517.  
  518.  
  519. /*****************************************************************************/
  520.  
  521.  
  522. /* Handy for LT_LevelWidth and LT_NewLevelWidth. Note: parameters must be passed
  523.  * over the stack.
  524.  */
  525. typedef LONG (* DISPFUNC)(struct Gadget *gad,LONG value,...);
  526.  
  527.  
  528. /*****************************************************************************/
  529.  
  530.  
  531. /* Useful macros */
  532. #define LT_GetString(Handle,Code)    ((STRPTR)LT_GetAttributesA((Handle),(Code),NULL))
  533.  
  534. #define LAMN_Menu_UserData(m)        (*(APTR *)(((struct Menu *)(m)) + 1))
  535. #define LAMN_Menu_ID(m)            (((ULONG *)(((struct Menu *)(m)) + 1))[1])
  536.  
  537. #define LAMN_Item_UserData(m)        (*(APTR *)(((struct MenuItem *)(m)) + 1))
  538. #define LAMN_Item_ID(m)            (((ULONG *)(((struct MenuItem *)(m)) + 1))[1])
  539.  
  540.  
  541. /*****************************************************************************/
  542.  
  543. #ifdef GTLAYOUT_OBSOLETE
  544. /* Obsolete tags, don't use in new code */
  545. #define LA_Lines        LABX_Rows
  546. #define LA_Spread        LAGR_Spread
  547. #define LA_SameSize        LAGR_SameSize
  548. #define LA_FullCheck        LASL_FullCheck
  549. #define LA_ExtraLabels        LALV_ExtraLabels
  550. #define LA_LastGadget        TAG_USER+28
  551. #define LA_SmallPalette        LAPA_SmallPalette
  552. #define LA_Labels        LALV_Labels
  553. #define LA_Picker        LATX_Picker
  554. #define LA_DrawBox        LAFR_DrawBox
  555. #define LA_FirstLabel        LABX_FirstLabel
  556. #define LA_LastLabel        LABX_LastLabel
  557. #define LA_LabelTable        LABX_LabelTable
  558. #define LA_Min            TAG_USER+23
  559. #define LA_Max            TAG_USER+24
  560. #define LA_Link            LALV_Link
  561. #define LA_Menu            LAWN_Menu
  562. #define LA_HistoryLines        LAST_HistoryLines
  563. #define LA_HistoryHook        LAST_HistoryHook
  564. #define LA_ReturnKey        LABT_ReturnKey
  565. #define LA_ExtraFat        LABT_ExtraFat
  566. #define LA_CursorKey        LALV_CursorKey
  567. #define STORE_BYTE        TAG_USER+63
  568. #define STORE_UBYTE        TAG_USER+64
  569. #define STORE_WORD        TAG_USER+65
  570. #define STORE_BOOL        TAG_USER+65
  571. #define STORE_UWORD        TAG_USER+66
  572. #define STORE_LONG        TAG_USER+67
  573. #define STORE_ULONG        TAG_USER+68
  574. #define STORE_STRPTR        TAG_USER+69
  575. #define LAHN_Font        TAG_USER+41
  576. #define LH_Font            TAG_USER+41
  577. #define LH_AutoActivate        TAG_USER+42
  578. #define LH_LocaleHook        TAG_USER+4
  579. #define LH_CloningPermitted    TAG_USER+61
  580. #define LH_EditHook        TAG_USER+74
  581. #define LH_ExactClone        TAG_USER+75
  582. #define LH_MenuGlyphs        TAG_USER+76
  583. #define LH_Parent        TAG_USER+83
  584. #define LH_BlockParent        TAG_USER+84
  585. #define LH_SimpleClone        TAG_USER+90
  586. #define LH_ExitFlush        TAG_USER+108
  587. #define LH_UserData        TAG_USER+116
  588. #define LH_RawKeyFilter        TAG_USER+142
  589.  
  590.  
  591. /* Obsolete defines, don't use in new code */
  592. #define PLACE_LEFT        PLACE_Left
  593. #define PLACE_RIGHT        PLACE_Right
  594. #define PLACE_ABOVE        PLACE_Above
  595. #define PLACE_IN        PLACE_In
  596. #define PLACE_BELOW        PLACE_Below
  597.  
  598. #define ALIGNTEXT_LEFT        ALIGNTEXT_Left
  599. #define ALIGNTEXT_CENTERED    ALIGNTEXT_Centered
  600. #define ALIGNTEXT_RIGHT        ALIGNTEXT_Right
  601. #define ALIGNTEXT_PAD        ALIGNTEXT_Pad
  602.  
  603. #define TDBT_BACKWARD        TDBT_Backward
  604. #define TDBT_FORWARD        TDBT_Forward
  605. #define TDBT_PREVIOUS        TDBT_Previous
  606. #define TDBT_NEXT        TDBT_Next
  607. #define TDBT_STOP        TDBT_Stop
  608. #define TDBT_PAUSE        TDBT_Pause
  609. #define TDBT_RECORD        TDBT_Record
  610. #define TDBT_REWIND        TDBT_Rewind
  611. #define TDBT_EJECT        TDBT_Eject
  612. #define TDBT_PLAY        TDBT_Play
  613.  
  614. #define ALIGNF_RIGHT        ALIGNF_Right
  615. #define ALIGNF_LEFT        ALIGNF_Left
  616. #define ALIGNF_TOP        ALIGNF_Top
  617. #define ALIGNF_BOTTOM        ALIGNF_Bottom
  618. #define ALIGNF_EXTRA_RIGHT    ALIGNF_ExtraRight
  619. #define ALIGNF_EXTRA_LEFT    ALIGNF_ExtraLeft
  620. #define ALIGNF_EXTRA_TOP    ALIGNF_ExtraTop
  621. #define ALIGNF_EXTRA_BOTTOM    ALIGNF_ExtraBottom
  622.  
  623. #define HISTORYHOOK_DISCARD_OLDEST    HISTORYHOOK_DiscardOldest
  624.  
  625. #define INCREMENTERMSG_DECREMENT    INCREMENTERMSG_Decrement
  626. #define INCREMENTERMSG_INITIAL        INCREMENTERMSG_Initial
  627. #define INCREMENTERMSG_INCREMENT    INCREMENTERMSG_Increment
  628.  
  629. /* Obsolete routines redone as macros. */
  630. #define LT_GetDrawInfo(Handle)        ((Handle) ? ((Handle)->DrawInfo)    : NULL)
  631. #define LT_GetVisualInfo(Handle)    ((Handle) ? ((Handle)->VisualInfo)    : NULL)
  632. #define LT_GetScreen(Handle)        ((Handle) ? ((Handle)->Screen)        : NULL)
  633. #define LT_SetAutoActivate(Handle,Mode)    LT_SetAttributes(Handle,0,LH_AutoActivate,Mode,TAG_DONE)
  634. #endif    /* GTLAYOUT_OBSOLETE */
  635.  
  636. /*****************************************************************************/
  637.  
  638.  
  639. #endif    /* _GTLAYOUT_H */
  640.